import QtQuick 1.1
import com.nokia.meego 1.0
import "Logic.js" as Logic

Page {
    id: pageImportHelp

    tools: ToolBarLayout {
        id: tool_only_back
        opacity: userTheme.opacityToolbar
        ToolIcon {
            id: toolIconBack
            //iconId: "toolbar-back"
            iconSource: "images/toolbar/back.png"
            onClicked: {
                pageStack.pop();
            }
        }
    } //ToolBarLayout

    QNMTitle {
        id: titlePage
        text: qsTr("Import help")
        image: "images/import.png"
        busy: false
    }

    BackgroundPage { }

    Image {
        id: titleImg
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.top: titlePage.bottom
        anchors.topMargin: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? 10 : 20
        //source: "image://theme/icon-l-user-guide"
        source: "images/info.png"
    }

    Flickable {
        id: flickArea
        anchors {
            top: titleImg.bottom
            bottom: parent.bottom
            left: parent.left
            right: parent.right
            topMargin: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? 10 : 20
            leftMargin: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? 20 : 10
            rightMargin: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? 20 : 10
            bottomMargin: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? 10 : 20
        }

        flickableDirection: Flickable.VerticalFlick

        width: parent.width
        height: parent.height - titleImg.height

        contentWidth: contentFlickArea.width
        contentHeight: contentFlickArea.height
        clip: true

        Column {
            id: contentFlickArea
            spacing: 10
            width: parent.width

            Text {
                font.pixelSize: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? 22 : 18
                text: "1. " + qsTr("To import words from a file, create the XML file:") +
                      "\n\n" +
                      "<meewords>\n" +
                      "  <words>\n" +
                      "    <word>WRD1</word>\n" +
                      "    <translation>TRANSL1</translation>\n" +
                      "  </words>\n" +
                      "  <words>\n" +
                      "    <word>WRD2</word>\n" +
                      "    <translation>TRANSL2</translation>\n" +
                      "  </words>\n" +
                      "    ...\n" +
                      "</meewords>\n" +
                      "\n\n" +
                      qsTr("where WRD - the word, TRANSL - translation of the word") + "\n\n" +
                      "2. " + qsTr("Put the file in any directory on your device" ) + "\n\n" +
                      "3. " + qsTr("Specify the file path") + "\n\n" +
                      "4. " + qsTr("Select a category in which to make the import of words") + "\n\n" +
                      "5. " + qsTr("Click the \"Start import\"") + "\n\n"
            }
            Label {
                font.pixelSize: screen.orientationString == "Landscape" || screen.orientationString == "LandscapeInverted" ? 22 : 18
                text: "<html>" + qsTr("All your questions on the project home page") + ":<br><br>" +
                      "<a href='http://projects.developer.nokia.com/meewords'>http://projects.developer.nokia.com/meewords</a></html>"
                onLinkActivated: { Qt.openUrlExternally (link) }
            }

        } //Column
    }
    ScrollDecorator {
        flickableItem: flickArea
    }
}
